/*
 * 项   目：mobile-pay
 * 作   者：LuoYiMin
 * 邮   箱：1725990142@qq.com
 * 创建时间：2018/9/18 11:49
 */
package cn.roin.learn.demo;


import cn.roin.learn.demo.util.RequestUtil;
import org.springframework.web.servlet.view.freemarker.FreeMarkerView;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

public class MyFreemarkerView extends FreeMarkerView {

    @Override
    protected void exposeHelpers(Map<String, Object> model, HttpServletRequest request) throws Exception {
        String base = RequestUtil.getBasePath(request);
        model.put("base", base);
        super.exposeHelpers(model, request);
    }
}
